<?
ob_start();
session_start();
include("conf/config.php");
include("conf/database.php");
include("conf/tools.php");

/*echo $_SESSION['randomnr2'];
echo "<br>";
echo md5($_POST["captcha_code"]);
exit;*/	
if($_SESSION['randomnr2']==md5($_POST["captcha_code"])){

$curTime=getIndianDateTime();
foreach($_POST as $key => $value) { $arr_data[$key]=$value;}
foreach($arr_data as $key => $value) { $arr_data[$key]=addslashes($value); }
$arr_data["rec_status"]=1;
$reg_id=insert_qry("bkitc_product_subscription",$arr_data);
qry_data("update bkitc_product_subscription set rec_created='".$curTime."' where rec_id=".$reg_id);
send_avsubscribe_notification($arr_data);
header("location:subscribeav.php?mode=1");
unset($_SESSION["form-data"]);

}else{

	$_SESSION["form-data"]=$_POST;
	header("location:subscribeav.php?mode=2#cap");
}

?>



